//
//  TrainCenterViewController.swift
//  CoolTennisBall
//
//  Created by CA on 16/5/12.
//  Copyright © 2016年 CoolLang. All rights reserved.
//

import UIKit

class TrainCenterViewController: UIViewController {
    
    @IBOutlet weak var realTimeButton: UIButton!
    @IBOutlet weak var trackButton: UIButton!
    @IBOutlet weak var videoButton: UIButton!
    

    // MARK: View LifeCycle
    
    override func viewDidLoad() {
        super.viewDidLoad()
        
        configureLocailzation()
        
        //navigationItem.rightBarButtonItem = UIBarButtonItem.init(title: "Test", style: .plain, target: self, action: #selector(openTestViewController))
    }
    
    func openTestViewController() {
        let vc = UIStoryboard(name: "TestViewController", bundle: nil).instantiateViewController(withIdentifier: "TestViewController")
        self.navigationController?.pushViewController(vc, animated: true);
    }
    
    // MARK: Private Method
    fileprivate func configureLocailzation() {
        navigationItem.title = NSLocalizedString("Training Center", comment: "")
        realTimeButton.setBackgroundImage(UIImage(named: NSLocalizedString("train_realtime_en", comment: "")), for: UIControlState())
        trackButton.setBackgroundImage(UIImage(named: NSLocalizedString("train_track_en", comment: "")), for: UIControlState())
        videoButton.setBackgroundImage(UIImage(named: NSLocalizedString("train_video_en", comment: "")), for: UIControlState())
    }
}
